<?php
/**
 * Created by PhpStorm.
 * User: 96151
 * Date: 2018/10/23
 * Time: 19:40
 */
namespace app\common\service;
use DfaFilter\SensitiveHelper;

class Sensitive
{
    /**
     * @return SensitiveHelper
     */
    public static function init()
    {
        // 获取感词库文件路径
        $wordFilePath = CommonPath."service/ArticlePushTpl/words.txt";

        $handle = SensitiveHelper::init()->setTreeByFile( $wordFilePath );
        return $handle;
    }
}